package com.vito.dcs.asphalt.device.dao;

import java.util.Map;

public class MapUtil {

    /**
     * 沥青from表单字段
     * @param map
     * @return
     */
    public static Map<String,Object> mapAsphaltFrom(Map<String,Object> map){
        map.put("oilstoneRatioMin","".equals(map.get("oilstoneRatioMin")) ? "0" : map.get("oilstoneRatioMin"));
        map.put("oilstoneRatioMax","".equals(map.get("oilstoneRatioMax")) ? "0" : map.get("oilstoneRatioMax"));
        map.put("oilstoneRatioValue","".equals(map.get("oilstoneRatioValue")) ? "0" : map.get("oilstoneRatioValue"));
        map.put("asphaltRatioMin","".equals(map.get("asphaltRatioMin")) ? "0" : map.get("asphaltRatioMin"));
        map.put("asphaltRatioMax","".equals(map.get("asphaltRatioMax")) ? "0" : map.get("asphaltRatioMax"));
        map.put("additiveRatioMin","".equals(map.get("additiveRatioMin")) ? "0" : map.get("additiveRatioMin"));
        map.put("additiveRatioMax","".equals(map.get("additiveRatioMax")) ? "0" : map.get("additiveRatioMax"));
        map.put("aggregate1RatioMax","".equals(map.get("aggregate1RatioMax")) ? "0" : map.get("aggregate1RatioMax"));
        map.put("aggregate1RatioMin","".equals(map.get("aggregate1RatioMin")) ? "0" : map.get("aggregate1RatioMin"));
        map.put("aggregate1Value","".equals(map.get("aggregate1Value")) ? "0" : map.get("aggregate1Value"));
        map.put("aggregate2RatioMax","".equals(map.get("aggregate2RatioMax")) ? "0" : map.get("aggregate2RatioMax"));
        map.put("aggregate2RatioMin","".equals(map.get("aggregate2RatioMin")) ? "0" : map.get("aggregate2RatioMin"));
        map.put("aggregate2Value","".equals(map.get("aggregate2Value")) ? "0" : map.get("aggregate2Value"));
        map.put("aggregate3RatioMax","".equals(map.get("aggregate3RatioMax")) ? "0" : map.get("aggregate3RatioMax"));
        map.put("aggregate3RatioMin","".equals(map.get("aggregate3RatioMin")) ? "0" : map.get("aggregate3RatioMin"));
        map.put("aggregate3Value","".equals(map.get("aggregate3Value")) ? "0" : map.get("aggregate3Value"));
        map.put("aggregate4RatioMax","".equals(map.get("aggregate4RatioMax")) ? "0" : map.get("aggregate4RatioMax"));
        map.put("aggregate4RatioMin","".equals(map.get("aggregate4RatioMin")) ? "0" : map.get("aggregate4RatioMin"));
        map.put("aggregate4Value","".equals(map.get("aggregate4Value")) ? "0" : map.get("aggregate4Value"));
        map.put("aggregate5RatioMax","".equals(map.get("aggregate5RatioMax")) ? "0" : map.get("aggregate5RatioMax"));
        map.put("aggregate5RatioMin","".equals(map.get("aggregate5RatioMin")) ? "0" : map.get("aggregate5RatioMin"));
        map.put("aggregate5Value","".equals(map.get("aggregate5Value")) ? "0" : map.get("aggregate5Value"));
        map.put("aggregate6RatioMax","".equals(map.get("aggregate6RatioMax")) ? "0" : map.get("aggregate6RatioMax"));
        map.put("aggregate6RatioMin","".equals(map.get("aggregate6RatioMin")) ? "0" : map.get("aggregate6RatioMin"));
        map.put("aggregate6Value","".equals(map.get("aggregate6Value")) ? "0" : map.get("aggregate6Value"));
        map.put("aggregate7RatioMax","".equals(map.get("aggregate7RatioMax")) ? "0" : map.get("aggregate7RatioMax"));
        map.put("aggregate7RatioMin","".equals(map.get("aggregate7RatioMin")) ? "0" : map.get("aggregate7RatioMin"));
        map.put("aggregate7Value","".equals(map.get("aggregate7Value")) ? "0" : map.get("aggregate7Value"));
        map.put("aggregate8RatioMax","".equals(map.get("aggregate8RatioMax")) ? "0" : map.get("aggregate8RatioMax"));
        map.put("aggregate8RatioMin","".equals(map.get("aggregate8RatioMin")) ? "0" : map.get("aggregate8RatioMin"));
        map.put("aggregate8Value","".equals(map.get("aggregate8Value")) ? "0" : map.get("aggregate8Value"));
        map.put("powder1RatioMax","".equals(map.get("powder1RatioMax")) ? "0" : map.get("powder1RatioMax"));
        map.put("powder1RatioMin","".equals(map.get("powder1RatioMin")) ? "0" : map.get("powder1RatioMin"));
        map.put("powder1Value","".equals(map.get("powder1Value")) ? "0" : map.get("powder1Value"));
        map.put("powder2RatioMax","".equals(map.get("powder2RatioMax")) ? "0" : map.get("powder2RatioMax"));
        map.put("powder2RatioMin","".equals(map.get("powder2RatioMin")) ? "0" : map.get("powder2RatioMin"));
        map.put("powder2Value","".equals(map.get("powder2Value")) ? "0" : map.get("powder2Value"));
        map.put("powder3RatioMax","".equals(map.get("powder3RatioMax")) ? "0" : map.get("powder3RatioMax"));
        map.put("powder3RatioMin","".equals(map.get("powder3RatioMin")) ? "0" : map.get("powder3RatioMin"));
        map.put("powder3Value","".equals(map.get("powder3Value")) ? "0" : map.get("powder3Value"));
        map.put("powder4RatioMax","".equals(map.get("powder4RatioMax")) ? "0" : map.get("powder4RatioMax"));
        map.put("powder4RatioMin","".equals(map.get("powder4RatioMin")) ? "0" : map.get("powder4RatioMin"));
        map.put("powder4Value","".equals(map.get("powder4Value")) ? "0" : map.get("powder4Value"));
        return map;
    }

    /**
     * 处理沥青table框字段
     * @param map
     * @return
     */
    public static  Map<String,Object> mapAsphaltTable(Map<String,Object> map){
        map.put("designValue","".equals(map.get("designValue")) ? "0" : map.get("designValue"));
        map.put("workMin","".equals(map.get("workMin")) ? "0" : map.get("workMin"));
        map.put("workMax","".equals(map.get("workMax")) ? "0" : map.get("workMax"));
        map.put("designMin","".equals(map.get("designMin")) ? "0" : map.get("designMin"));
        map.put("designMax","".equals(map.get("designMax")) ? "0" : map.get("designMax"));
        map.put("aggregate1","".equals(map.get("aggregate1")) ? "0" : map.get("aggregate1"));
        map.put("aggregate2","".equals(map.get("aggregate2")) ? "0" : map.get("aggregate2"));
        map.put("aggregate3","".equals(map.get("aggregate3")) ? "0" : map.get("aggregate3"));
        map.put("aggregate4","".equals(map.get("aggregate4")) ? "0" : map.get("aggregate4"));
        map.put("aggregate5","".equals(map.get("aggregate5")) ? "0" : map.get("aggregate5"));
        map.put("aggregate6","".equals(map.get("aggregate6")) ? "0" : map.get("aggregate6"));
        map.put("aggregate7","".equals(map.get("aggregate7")) ? "0" : map.get("aggregate7"));
        map.put("aggregate8","".equals(map.get("aggregate8")) ? "0" : map.get("aggregate8"));
        map.put("powder1","".equals(map.get("powder1")) ? "0" : map.get("powder1"));
        map.put("powder2","".equals(map.get("powder2")) ? "0" : map.get("powder2"));
        map.put("powder3","".equals(map.get("powder3")) ? "0" : map.get("powder3"));
        map.put("powder4","".equals(map.get("powder4")) ? "0" : map.get("powder4"));
        return map;
    }

    /**
     * 水稳from表单字段
     * @param map
     * @return
     */
    public static Map<String,Object> mapWaterFrom(Map<String,Object> map){
        map.put("aggregate1RatioMin","".equals(map.get("aggregate1RatioMin")) ? "0" : map.get("aggregate1RatioMin"));
        map.put("aggregate1RatioMax","".equals(map.get("aggregate1RatioMax")) ? "0" : map.get("aggregate1RatioMax"));
        map.put("aggregate2RatioMin","".equals(map.get("aggregate2RatioMin")) ? "0" : map.get("aggregate2RatioMin"));
        map.put("aggregate2RatioMax","".equals(map.get("aggregate2RatioMax")) ? "0" : map.get("aggregate2RatioMax"));
        map.put("aggregate2RatioTheory","".equals(map.get("aggregate2RatioTheory")) ? "0" : map.get("aggregate2RatioTheory"));
        map.put("aggregate3RatioMin","".equals(map.get("aggregate3RatioMin")) ? "0" : map.get("aggregate3RatioMin"));
        map.put("aggregate3RatioMax","".equals(map.get("aggregate3RatioMax")) ? "0" : map.get("aggregate3RatioMax"));
        map.put("aggregate3RatioTheory","".equals(map.get("aggregate3RatioTheory")) ? "0" : map.get("aggregate3RatioTheory"));
        map.put("aggregate4RatioMin","".equals(map.get("aggregate4RatioMin")) ? "0" : map.get("aggregate4RatioMin"));
        map.put("aggregate4RatioMax","".equals(map.get("aggregate4RatioMax")) ? "0" : map.get("aggregate4RatioMax"));
        map.put("aggregate4RatioTheory","".equals(map.get("aggregate4RatioTheory")) ? "0" : map.get("aggregate4RatioTheory"));
        map.put("aggregate5RatioMin","".equals(map.get("aggregate5RatioMin")) ? "0" : map.get("aggregate5RatioMin"));
        map.put("aggregate5RatioMax","".equals(map.get("aggregate5RatioMax")) ? "0" : map.get("aggregate5RatioMax"));
        map.put("aggregate5RatioTheory","".equals(map.get("aggregate5RatioTheory")) ? "0" : map.get("aggregate5RatioTheory"));
        map.put("aggregate6RatioMin","".equals(map.get("aggregate6RatioMin")) ? "0" : map.get("aggregate6RatioMin"));
        map.put("aggregate6RatioMax","".equals(map.get("aggregate6RatioMax")) ? "0" : map.get("aggregate6RatioMax"));
        map.put("aggregate6RatioTheory","".equals(map.get("aggregate6RatioTheory")) ? "0" : map.get("aggregate6RatioTheory"));
        map.put("cementRatioMin","".equals(map.get("cementRatioMin")) ? "0" : map.get("cementRatioMin"));
        map.put("cementRatioMax","".equals(map.get("cementRatioMax")) ? "0" : map.get("cementRatioMax"));
        map.put("cementRatioTheory","".equals(map.get("cementRatioTheory")) ? "0" : map.get("cementRatioTheory"));
        map.put("powderRatioMin","".equals(map.get("powderRatioMin")) ? "0" : map.get("powderRatioMin"));
        map.put("powderRatioMax","".equals(map.get("powderRatioMax")) ? "0" : map.get("powderRatioMax"));
        map.put("powderRatioTheory","".equals(map.get("powderRatioTheory")) ? "0" : map.get("powderRatioTheory"));
        map.put("additiveRatioMin","".equals(map.get("additiveRatioMin")) ? "0" : map.get("additiveRatioMin"));
        map.put("additiveRatioMax","".equals(map.get("additiveRatioMax")) ? "0" : map.get("additiveRatioMax"));
        map.put("additiveRatioTheory","".equals(map.get("additiveRatioTheory")) ? "0" : map.get("additiveRatioTheory"));
        map.put("waterRatioMin","".equals(map.get("waterRatioMin")) ? "0" : map.get("waterRatioMin"));
        map.put("waterRatioMax","".equals(map.get("waterRatioMax")) ? "0" : map.get("waterRatioMax"));
        return  map ;
    }
    /**
     * 水稳Table框字段
     * @param map
     * @return
     */
    public static Map<String,Object> mapWaterTable(Map<String,Object> map){
        map.put("designValue","".equals(map.get("designValue")) ? "0" : map.get("designValue"));
        map.put("workMin","".equals(map.get("workMin")) ? "0" : map.get("workMin"));
        map.put("workMax","".equals(map.get("workMax")) ? "0" : map.get("workMax"));
        map.put("designMin","".equals(map.get("designMin")) ? "0" : map.get("designMin"));
        map.put("designMax","".equals(map.get("designMax")) ? "0" : map.get("designMax"));
        map.put("aggregate1","".equals(map.get("aggregate1")) ? "0" : map.get("aggregate1"));
        map.put("aggregate2","".equals(map.get("aggregate2")) ? "0" : map.get("aggregate2"));
        map.put("aggregate3","".equals(map.get("aggregate3")) ? "0" : map.get("aggregate3"));
        map.put("aggregate4","".equals(map.get("aggregate4")) ? "0" : map.get("aggregate4"));
        map.put("aggregate5","".equals(map.get("aggregate5")) ? "0" : map.get("aggregate5"));
        map.put("aggregate6","".equals(map.get("aggregate6")) ? "0" : map.get("aggregate6"));
        return  map ;
    }
}
